<template>
  <div class="title" :style="computedStyle">
    <div class="flexleft">
      <slot name="left"></slot>
    </div>
    <div class="flexright">
      <!-- <slot name="right-bar"></slot> -->
      <slot name="right"></slot>
    </div>
  </div>
</template>

<script>
import { } from "vue"
export default {
  name: 'MTitle',
  props: {
    style: {
      type: Object,
      required: false
    },
  },
  components: {

  },
  computed: {
    computedStyle() {
      return {
        ...this.style
      };
    }
  },
  setup() {
    // eslint-disable-next-line vue/no-setup-props-destructure
    //const rightBarValue = props.rightBar

    return {
      //rightBarValue,

    };
  },
};
</script>

<style scoped>
.title {
  background: #EFEFEF;
  padding: 5px;
  box-sizing: border-box;
  font-size: 13px;
  display: flex;
}

.flexleft {
  flex: 1 1 100px;
}

.flexright {
  flex: 1 1 50px;
  text-align: right;
}
</style>
